//
//  ViewController.m
//  LittleStarts
//
//  Created by Timmy on 16/8/28.
//  Copyright © 2016年 Timmy. All rights reserved.
//

#import "ViewController.h"
#import "TStarsView.h"

@interface ViewController ()

@property(nonatomic,strong)TStarsView *one;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.one = [[TStarsView alloc] initWithFrame:CGRectMake(0, 100, CGRectGetWidth(self.view.frame), 50)];
    [self.view addSubview:self.one];
    UIButton *doneBut = [UIButton buttonWithType:(UIButtonTypeCustom)];
    [self.view addSubview:doneBut];
    doneBut.frame = CGRectMake(50, CGRectGetMaxY(self.one.frame) + 50, CGRectGetWidth(self.view.frame) - 100, 50);
    [doneBut setBackgroundColor:[UIColor blueColor]];
    [doneBut addTarget:self action:@selector(doneButClieckd:) forControlEvents:(UIControlEventTouchUpInside)];
    [doneBut setTitle:@"确定" forState:UIControlStateNormal];
    
}

- (void)doneButClieckd:(UIButton *)sender {

    NSLog(@"[self.one getCommentValue] == %ld",[self.one getCommentValue]);

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
